/*jslint browser: true, devel: true, bitwise: true, white: true, plusplus: true, nomen:true */
/*global $:true, define:true */

define(['WID/Test/Helpers/MockObject'], function(MockObject) {
"use strict";
return {
	name:'MockObjectCase', 
	desc:'Its testing mock objects',
	
	each: {
		mock: null
	},
	
	beforeEach: function() {
		this.each.mock = new MockObject();
	},
	
	tests:[
		function creating(each) {
			var m = each.mock;
			this.expect(m.Methods).toBeDefined();
			this.expect(m.Name).toBeUndefined();
			this.expect(m.Args).toBeUndefined();
		},
		
		function when(each) {
			var m = each.mock;
			m.when('test');
			this.expect(m.Name).toBe('test');
		},
		
		function get(each) {
			var m = each.mock;
			m.when('test').get(0);
			this.expect(m.Args).toBeDefined();
			// TODO add expection get invoked before when 
		},
		
		function thenReturn(each) {
			var m = each.mock;
			// TODO add expection to this.
		},
		
		function addingMockMethods(each) {
			var m = each.mock;
			
			m.when('test').get(1,2).thenReturn(3);
			this.expect(m.test(1,2)).toBe(3);
			
			m.when('test').get().thenReturn();
			this.expect(m.test()).toBeUndefined();
		}
		
	]
};
});
